package po

import (
	"gorm.io/gorm"
	"zk1-project/pkg/global"
)

type Exam struct {
	gorm.Model
	Name                string `gorm:"type:varchar(30);not null;"`
	Sex                 string `gorm:"type:varchar(10);not null;"`
	IdNumber            string `gorm:"type:varchar(40);not null;"`
	RegistrationAddress string `gorm:"type:varchar(50);not null;"`
	RegistrationDate    string `gorm:"type:varchar(20);not null;"`
	TestDate            string `gorm:"type:varchar(20);not null;"`
}

func (e *Exam) ExamRegister() error {
	return global.DB.Create(&e).Error
}
